The only API that generates code diff images, renders directly from GitHub repos, and highlights specific lines — all in a single POST request.
Output examples
useDebounce.ts — TypeScript · tokyo-night
main.py — Python · dracula
middleware.go — Go · github-dark
handlers.rs — Rust · one-dark-pro
Code Intelligence API
Two endpoints turn source code into high-resolution PNG screenshots — with syntax highlighting, diff views, and direct GitHub integration.
POST /v1/code/snap
Code Snapshot
Render any snippet with syntax highlighting. 10 themes, 30+ languages, optional line highlighting and mac-window chrome.
{ "code": "const greet = (n) => {\n return `Hi, ${n}!`\n}", "lang": "typescript", "theme": "tokyo-night", "highlight_lines": "2" }
POST /v1/code/diff
Code Diff
Before/after diff with red/green line marking. Split or unified layout — perfect for PR summaries and code review highlights.
{ "before": "const limit = 10", "after": "const limit = 100", "lang": "typescript", "theme": "tokyo-night", "layout": "split" }
github_repo
GitHub Native
Point at any public repo and file — no copy-pasting. Specify a line range and branch. Language is auto-detected from the extension.
{ "github_repo": "vercel/next.js", "github_file": "packages/next/src/server/app-render.tsx", "github_lines": "1-30", "github_branch": "canary", "theme": "github-dark" }
Available themes
How it works
01 — Get a key
One API key. No SDK required.
Grab a key below. Set an env var. You're ready.
export IMMAGGA_KEY="ik_live_xxxxxxxxxxxx"
02 — POST your code
Snippet, GitHub repo, or diff — your choice.
Send code directly or point at a GitHub file. Pick theme, language, and which lines to highlight.
curl -X POST https://api.immagga.com/v1/code/snap \ -H "Authorization: Bearer $IMMAGGA_KEY" \ -d '{"github_repo":"you/repo","github_file":"src/main.ts","theme":"tokyo-night"}'
03 — Use the URL
Drop it anywhere images are accepted.
Embed in README files, PR descriptions, blog posts, or Slack. Images are cached for 30 days.
// Response: { url, width, height, render_ms } // Use in a README, PR, blog post, or docs: 
No browser. No dashboard. No Ray.so. Code diff images, GitHub-native rendering, and line highlighting — features no other code image tool exposes as an API. One POST, one PNG.
Pricing
No feature tiers. No seat limits. Just renders.